#ifndef __MERCKU_TOOLS_LINUX_DHCP_H__
#define __MERCKU_TOOLS_LINUX_DHCP_H__

#include <core/all.h>


typedef struct
{
    uint32_t dhcp_ofd_at_sec;
    MacHrCompacted mac;
    IPv4 ip;
    char hostname[64];
} DhcpLeaseEntry;

/**
 * @brief 解析 /tmp/dhcp.lease 文件内容
 * @param leases 解析结果。注意：需要使用 tracable_free 释放。
*/
MError *list_dhcp_lease(DhcpLeaseEntry **leases, uint32_t *num);

#endif // __MERCKU_TOOLS_LINUX_DHCP_H__